package org.lds.message.center.plugin.core.autoconfigure;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.lds.message.center.plugin.core.properties.RemoteProperties;
import org.lds.message.center.plugin.core.remote.RemoteService;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Slf4j
@Configuration
@RequiredArgsConstructor
@EnableConfigurationProperties({RemoteProperties.class})
public class MessageCenterRemoteAutoConfiguration {
    private final RemoteProperties remoteProperties;

    @Bean
    public RemoteService messageCenterRemoteService() {
        return new RemoteService(remoteProperties);
    }

}
